// JavaScript Document\
$(document).ready(function () {
    //phone-nav
    $('.menuBtn').append('<b></b><b></b><b></b>');
    $(".menuBtn").click(function () {
        $('body').toggleClass('fixme');
        $(".header .nav").slideToggle(400);
        $(".header .nav li").addClass('animated ' + ' fadeInUp');
    });
    $(".header .nav ul li").click(function () {
        $(this).find("dl").slideToggle(300).parents("li").siblings().find("dl").slideUp(300);

    })
    //首页banner轮播

    //index-banner
    $('.banner .slider').slick({
        dots: true,
        arrows: false,
        autoplay: true,
        autoplaySpeed: 4000,
        speed: 900,
        slidesToShow: 1,
        slidesToScroll: 1,

    });

    //

    //设计师团队
    $('.index-team .slider').slick({
        dots: false,
        arrows: false,
        autoplay: true,
        autoplaySpeed: 4000,
        speed: 900,
        slidesToShow: 4,
        slidesToScroll: 1,
        responsive: [{
            breakpoint: 1200,
            settings: {
                slidesToShow: 2,
                slidesToScroll: 1,
                infinite: true,
                autoplay: true,
                autoplaySpeed: 4000,
                speed: 900,
                dots: false,
                arrows: false,

            }
        }, {
            breakpoint: 768,
            settings: {
                slidesToShow: 2,
                slidesToScroll: 1,
                infinite: true,
                autoplay: true,
                autoplaySpeed: 4000,
                speed: 900,
                dots: false,
                arrows: false,

            }
        }, {
            breakpoint: 480,
            settings: {
                slidesToShow: 1,
                slidesToScroll: 1,
                infinite: true,
                autoplay: true,
                autoplaySpeed: 4000,
                speed: 900,
                dots: false,
                arrows: false,
            }
        }]

    });

    // 切换案例
    $(".index_case .case-tabs li:first-child").addClass("active");
    $(".case-wrap").eq(0).show();
    $(".index_case .case-tabs li").click(function () {
        $(".index_case .case-tabs li").eq($(this).index()).addClass("active").siblings().removeClass('active');
        $(".case-wrap").hide().eq($(this).index()).fadeIn(600);
    });
    // 主材配置切换

    $(".confi-tabs ul li:first-child").addClass("active");
    $(".confi-wrap .con-imgs").eq(0).show();
    $(".confi-tabs ul li").click(function () {
        $(".confi-tabs ul li").eq($(this).index()).addClass("active").siblings().removeClass('active');
        $(".confi-wrap .con-imgs").hide().eq($(this).index()).fadeIn(600);
    });
    // 滚动到顶部
    $(".right-fixed .gotop").click(function () {
        var speed = 500; //滑动的速度
        $('body,html').animate({
            scrollTop: 0
        }, speed);
        return false;
    });

    //首页底部计算弹出
    $(".control-bar").click(function () {
        $(this).toggleClass("active");
        $(".fixed-bar-wrap").toggleClass("active");

    })
    //首页价格实时计算

    var zong = $('#zong');
    var cai = $('#cai');
    var ren = $('#ren');
    var she = $('#she');
    var zhi = $('#zhi');
    var myArray = [
        [121459, 58365, 50497, 8218, 4379],
        [155424, 69322, 77284, 5373, 3445],
        [108289, 87732, 17309, 1583, 1665],
        [236859, 126580, 92027, 11769, 6483],
        [142826, 75720, 52404, 9717, 4985]
    ];

    var i = 0;
    var timer = setInterval(function () {
        if (i > 4) {
            i = 0;
        }
        var arraySon = myArray[i];
        zong.text(arraySon[0]);
        cai.text(arraySon[1]);
        ren.text(arraySon[2]);
        she.text(arraySon[3]);
        zhi.text(arraySon[4]);
        i++
    }, 200);




<<<<<<< HEAD
    //推荐设计师轮播
=======
    //推荐设计师轮播		
>>>>>>> 7d0decba80ca47ec811a6565ba6dfe1256c387c5
    $('.re-designers .slider').slick({
        dots: false,
        arrows: true,
        autoplay: true,
        autoplaySpeed: 4000,
        speed: 900,
        slidesToShow: 5,
        slidesToScroll: 1,
        responsive: [{
            breakpoint: 1200,
            settings: {
                slidesToShow: 4,
                slidesToScroll: 1,
                infinite: true,
                autoplay: true,
                autoplaySpeed: 4000,
                speed: 900,
                dots: false,
                arrows: true,

            }
        }, {
            breakpoint: 768,
            settings: {
                slidesToShow: 2,
                slidesToScroll: 3,
                infinite: true,
                autoplay: true,
                autoplaySpeed: 4000,
                speed: 900,
                dots: false,
                arrows: true,

            }
        }, {
            breakpoint: 480,
            settings: {
                slidesToShow: 1,
                slidesToScroll: 2,
                infinite: true,
                autoplay: true,
                autoplaySpeed: 4000,
                speed: 900,
                dots: false,
                arrows: true,
            }
        }]

    });

    //关于我们案例轮播
    $('.about-case .slider').slick({
        dots: false,
        arrows: true,
        autoplay: true,
        autoplaySpeed: 4000,
        speed: 900,
        slidesToShow: 5,
        slidesToScroll: 1,
        responsive: [{
            breakpoint: 1200,
            settings: {
                slidesToShow: 4,
                slidesToScroll: 1,
                infinite: true,
                autoplay: true,
                autoplaySpeed: 4000,
                speed: 900,
                dots: false,
                arrows: true,

            }
        }, {
            breakpoint: 768,
            settings: {
                slidesToShow: 2,
                slidesToScroll: 3,
                infinite: true,
                autoplay: true,
                autoplaySpeed: 4000,
                speed: 900,
                dots: false,
                arrows: true,

            }
        }, {
            breakpoint: 480,
            settings: {
                slidesToShow: 2,
                slidesToScroll: 2,
                infinite: true,
                autoplay: true,
                autoplaySpeed: 4000,
                speed: 900,
                dots: false,
                arrows: true,
            }
        }]

    });

<<<<<<< HEAD
    //案例精选轮播
=======
    //案例精选轮播		
>>>>>>> 7d0decba80ca47ec811a6565ba6dfe1256c387c5
    $('.al-list .slider').slick({
        dots: false,
        arrows: false,
        autoplay: true,
        autoplaySpeed: 4000,
        speed: 900,
        slidesToShow: 4,
        slidesToScroll: 1,
        responsive: [{
            breakpoint: 1200,
            settings: {
<<<<<<< HEAD
                slidesToShow: 3,
=======
                slidesToShow: 4,
>>>>>>> 7d0decba80ca47ec811a6565ba6dfe1256c387c5
                slidesToScroll: 1,
                infinite: true,
                autoplay: true,
                autoplaySpeed: 4000,
                speed: 900,
                dots: false,
                arrows: false,

            }
        }, {
            breakpoint: 768,
            settings: {
                slidesToShow: 2,
                slidesToScroll: 3,
                infinite: true,
                autoplay: true,
                autoplaySpeed: 4000,
                speed: 900,
                dots: false,
                arrows: false,

            }
        }, {
            breakpoint: 480,
            settings: {
                slidesToShow: 2,
                slidesToScroll: 2,
                infinite: true,
                autoplay: true,
                autoplaySpeed: 4000,
                speed: 900,
                dots: false,
                arrows: false,
            }
        }]

    });
<<<<<<< HEAD
    // 主材同盟切换
    $(".material .fr .m-con").eq(0).show();
    $(".material .fl ul li").click(function () {
        $(".material .fl ul li").eq($(this).index()).addClass("active").siblings().removeClass('active');
        $(".material .fr .m-con").hide().eq($(this).index()).fadeIn(600);
    });
=======


>>>>>>> 7d0decba80ca47ec811a6565ba6dfe1256c387c5
});